/**************************************************************************
 * main.c
 *
 * CECS619 Project 3
 *
 * Authors: Max Stoler, Jason Hatton
 * 
 *************************************************************************/

#include <stdio.h>
#include <stdlib.h>
#include "graph.h"
#include "stats.h"
#include "shortest_path.h"
#include "artic.h"
#include "subgraph.h"

/**************************************************************************
 * Main block
 *
 * Driver for the Social Networking Graph program
**************************************************************************/
int main(int argc, char **argv)
{
    Graph *g;
    Artic *a;
    
    if(argc != 2)
    {
        fprintf(stderr, "usage: cecs619proj3 FILE \n");
        return 1;
    }
    g = GraphLoad(argv[1]);
    if(!g)
    {
        return 1;
    }

    GraphPrintNames(g);
	printf("\n");
	PrintStats(g);
	printf("\n");
	ShortestPath(g);
    
    printf("\n");
    a = ArticCreate();
    if(!a)
    {
        printf("FAILED TO CREAT ARTIC OBJECT\n");
        return 1;
    }
    ArticFind(a,g);
    ArticDestroy(a);   

	printf("\n");
	FindSubGraphs(g);

#ifdef WIN32 
  system("PAUSE");	
#endif
  return 0;
}
